/**
 * @author 太阳当空丶赵
 * @date 2022/11/14-22:27
 * @version 1.0.0
 * filter
 */
export default {
    strTailor(str,len=10){
        let newStr = str
        if (newStr.length > len){
            newStr = newStr.slice(0,len)
        }
        return newStr
    },
    dateFormat (value) {
        let date = new Date(value * 1000);
        let year = date.getFullYear();
        let month = (date.getMonth() + 1 + '').padStart(2, '0');
        let day = (date.getDate() + '').padStart(2, '0');
        let hour = (date.getHours() + '').padStart(2, '0');
        let minute = (date.getMinutes() + '').padStart(2, '0');
        let second = (date.getSeconds() + '').padStart(2, '0');
        return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
    }
}
